package com.foreknow.elmboot.service;

import com.foreknow.elmboot.po.OrderDetailet;
import com.foreknow.elmboot.po.Orders;
import org.apache.ibatis.annotations.Update;
import org.springframework.core.annotation.Order;

import java.util.List;

public interface OrdersService {
    /**
     * 添加订单
     * @param order
     * @return
     */
    public int createOrders(Orders order);

    /**
     * 根据orderId查询订单信息
     * @param orderId
     * @return
     */
    public Orders getOrdersById(Integer orderId);

    /**
     * 根据userId查询用户所有订单
     * @param userId
     * @return
     */
    public List<Orders> listOrderByUserId(String userId);


    /**
     * 根据orderId改变支付状态
     * @param orderId
     * @return
     */
    public int updateorderState(Integer orderId);

}
